package com.cxh.mediasessiondemo;

/**
 * Created by Cxh
 * Time : 2021/10/23  00:19
 * Desc :
 */
public interface IMediaData {

    // 默认列表循环
    int PLAY_TYPE_DEFAULT = 1;
    int PLAY_TYPE_RANDOM = 2;
    int PLAY_TYPE_SINGLE = 3;

    String MEDIA_ROOT_ID = "service_root_id_0";
    String KEY_MEDIA_DURATION = "key_duration";
    String KEY_MEDIA_PROGRESS = "key_progress";
    String KEY_MEDIA_AUTHOR = "key_author";
    String KEY_MEDIA_PATH = "key_abs_path";
    String KEY_MEDIA_ID = "key_media_id";
    String KEY_MEDIA_TITLE = "key_media_title";
    String KEY_SEEKBAR_MAX = "key_seekbar_max";

    String KEY_CURRENT_INDEX = "key_curr_index";
    String KEY_CURRENT_LOOP = "key_curr_loop";
    String KEY_AUTO_PLAY = "key_auto_play";

    String ACTION_LOOP_TYPE = "action_loop_type_change";
    String ACTION_PROGRESS_CHANGE = "action_progress_change";
    String ACTION_HEARTBEAT = "action_heartbeat";

    String BUTTON_TAG_PAUSE = "button_tag_pause";
    String BUTTON_TAG_PLAY = "button_tag_play";

    default String getLoopText(int loopType) {
        String text = "";
        switch (loopType) {
            case PLAY_TYPE_SINGLE:
                text = "单曲循环";
                break;
            case PLAY_TYPE_RANDOM:
                text = "随机播放";
                break;
            case PLAY_TYPE_DEFAULT:
                text = "顺序播放";
                break;
        }
        return text;
    }
}
